package com.rainng.coursesystem.controller.admin;

import com.rainng.coursesystem.controller.BaseController;
import com.rainng.coursesystem.model.shitong.PdfFileCacheVo;
import com.rainng.coursesystem.model.shitong.TreatResultVo;
import com.rainng.coursesystem.model.vo.response.ResultVO;
import com.rainng.coursesystem.service.CheckFileService;
import com.rainng.coursesystem.service.TreatResultService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@Api(tags = "视同和实测结果接口")
@RequestMapping("/v2/result")
@RestController
public class FileResultController extends BaseController {

    @Resource
    private TreatResultService service;

    //查
    @PostMapping("/treat/read")
    public ResultVO readTreat(@RequestBody TreatResultVo vo) {
        return service.readFileCache(vo);
    }

    //写
    @PostMapping("/treat/write")
    public ResultVO writeTreat(@RequestBody TreatResultVo vo) {
        return service.writeFileCache(vo);
    }

    //删
    @PostMapping("/treat/delete")
    public ResultVO deleteTreat(@RequestBody TreatResultVo vo) {
        return service.deleteFile(vo);
    }


    //查
    @PostMapping("/trial/read")
    public ResultVO readTrial(@RequestBody TreatResultVo vo) {
        return service.readTrial(vo);
    }

    //写
    @PostMapping("/trial/write")
    public ResultVO writeTrial(@RequestBody TreatResultVo vo) {
        return service.writeTrial(vo);
    }

    //删
    @PostMapping("/trial/delete")
    public ResultVO deleteTrial(@RequestBody TreatResultVo vo) {
        return service.deleteTrial(vo);
    }


}
